Method and apparatus for providing enhanced streaming content delivery with multi-archive support using secure download manager and content-indifferent decoding

ABSTRACT

A system, apparatuses and methods are provided to download and process data and other content streamed over a wide area network using one or more dynamically fetched, material specific, data handlers (e.g., download assistants). A download assistant fetches a data stream from a remote location and processes the streamed data iteratively using buffers and multi-threaded processes through the decoder (e.g., codec), allowing source material-specific processing of the data as it is streamed from one or more download sources as well as content-indifferent and platform-indifferent decoding. To minimize versioning issues, payload construction for secure delivery is simplified to packing and encrypting a directory tree containing any number of files or other digital media into an archive and, when needed, dividing a payload into multiple files or archives with a descriptor that lists the archives.

This application is a continuation of U.S. patent application Ser. No.15/010,457, filed Jan. 29, 2016, which is a continuation of U.S. patentapplication Ser. No. 14/322,528, filed Jul. 2, 2014, which is acontinuation of U.S. patent application Ser. No. 13/118,346, filed May27, 2011, which claims the benefit of U.S. provisional application Ser.No. 61/344,134, filed May 28, 2010, the entire contents of which areincorporated herein by reference.

CROSS-REFERENCE TO RELATED PATENT APPLICATIONS

Related subject matter is disclosed and claimed in U.S. patentapplication Ser. No. 11/976,432, filed Oct. 24, 2007 (now issued as U.S.Pat. No. 7,882,037), which claims the benefit of provisional U.S. PatentApplication Ser. No. 60/853,766, filed Oct. 24, 2006, the entirecontents of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION Field of the Invention

The present invention relates to a system, apparatus and method forproviding secure distribution of electronic software, media and othercontent, and more particularly to a system, apparatus and method forprocessing streaming data using enhanced data handlers or dataprocessing decoders.

Description of the Related Art

Electronically distributable digital content takes many forms such assoftware applications, music and video files, documents, licenses, andso on. Each of these forms of content requires specialized processing ona user's desktop when they are executed or viewed.

The typical size of downloadable content is increasing. For example, assoftware applications become more complex and include more multimediacontent, they are increasing in size. As the demand for greater andgreater quality increases, the resolution and therefore size of musicand video files is also increasing.

The increasing file sizes of electronically distributable digitalcontent can create long delays before requested content is accessible bythe user because processing is typically delayed until the downloadcompletes. For example, a download must typically be completed beforethe downloaded content can be used. Further, existing content deliverymethods require sending compressed archives that are decompressed onlyafter the download is complete. This is wasteful in terms of space andtime.

Thus, a need exists for a system to download content to users moreefficiently to allow for more rapid access and use of the downloadedcontent by the user.

Prior to the system described in U.S. Pat. No. 7,882,037, no softwaretechnology existed that allowed consumers or online purchasers ofcontent, content retailers, and software manufacturers (e.g.,publishers) to ubiquitously engage in electronic software distribution(ESD), for example. A major shortcoming of digital content deliverytechnologies had been the inability to provide both security andscalability. The system described in U.S. Pat. No. 7,882,037(hereinafter referred to as the retail electronic distribution platform)allows for an unlimited number of manufacturers, retailers, andconsumers to interconnect using a common platform and provides servicefor completely seamless, secure, scalable and electronic distribution of(unlimited) digital goods. The retail electronic distribution platformemploys a download assistant instantiated using server technology, andan installation assistant that manages communication with a server farm.The installation assistant is downloaded onto the purchaser's computerand manages processing, verification and authentication of downloadedcontent requested by the purchaser, whereas the download assistantmanages delivery of the requested content to the purchaser's computer.

The installation assistant used with the retail electronic distributionplatform can require additional processing and memory space for certainplatforms (e.g., operating systems on users' computers) as compared withother platforms, thereby restricting the size of downloaded files thatcan be processed using those platforms. For example, to implement theinstallation assistant in certain platforms on users' computers,multiple copies (i.e., multiple footprints) of a downloaded content filemay be required.

Existing content delivery systems can also fail to achieve symmetricalencryption and decryption of content files developed in accordance withone platform, but decrypted and rendered in a different platform.

Accordingly, there is a need for an improved content delivery systemthat can provide efficient processing, verification, authentication anddecryption of downloaded content regardless of platform or operatingsystem (e.g., various PC-based OSs, Mac and so on) and that can supportdiffering content structures and formats.

SUMMARY OF THE INVENTION

Illustrative embodiments of the present invention address at least theabove problems and/or disadvantages and provide at least the advantagesdescribed below. Accordingly, an aspect of illustrative embodiments ofthe present invention is to provide content delivery processing andactions while the streaming of the data corresponding to the content isoccurring as opposed to waiting for download, encryption, delivery,delivery completion and decryption operations to occur. It is anotheraspect of exemplary embodiments of the present invention to employ codecbased methods that utilize the streaming and provide cross-platformsupport as well as support for different types of content.

In accordance with an illustrative embodiment of the present invention,a method of preparing encrypted content for rendering to a user isprovided, the content being delivered to the user and encrypted. Themethod comprises storing, on a computer-readable recording medium, aplurality of download assistants and/or download application programinterfaces (APIs), and a plurality of codecs, wherein the plurality ofdownload assistants and/or download APIs comprises at least twodifferent download assistants and/or download APIs for managing at leastone of different platforms, different user devices, different operatingsystems, different methods of rendering content for the user, anddifferent types of content, and the plurality of codecs comprises atleast two different codecs to handle at least one of different types ofcontent, and different methods of rendering content for the user. Themethod comprises receiving a request from a user for rendering ofselected content; selecting one of a download assistant and downloadapplication program interface (API) from among the plurality of downloadassistants and/or download APIs to facilitate the fulfillment of therequest depending on at least one of a platform employed by the user, anoperating system employed by the user, a method of rendering contentemployed by the user, and a designated content type of the selectedcontent, and selecting a codec from among the plurality of codecsdepending on at least one of the method of rendering content employed bythe user, and the designated content type of the selected content;providing to the user the selected one of a download assistant anddownload API, and the selected codec; activating a license for theselected content; and rendering the selected content, as long as thelicense is verified, by iteratively placing the selected content intobuffers via the selected one of a download assistant and download APIand decrypting and unpacking the buffers via the selected codec whilerendering to provide the selected content to the user.

In accordance with an aspect of illustrative embodiments of the presentinvention, the rendering comprises employing separate threads for theselected one of a download assistant and download API, and for theselected codec, respectively, to stream the selected content intobuffers, and to decrypt and unpack the buffers.

In accordance with another aspect of illustrative embodiments of thepresent invention, the payload for the selected content is prepared forstorage by packing and encrypting a directory structure containing atleast one of a file and digital media into an archive. For example, themethod can further comprise dividing the payload into multiple archiveswith a descriptor that lists the archives when the at least one of afile and digital media exceed a selected size limit. The the renderingfurther comprises employing the descriptor to facilitate unpacking thebuffers.

In accordance with another aspect of illustrative embodiments of thepresent invention, the selected codec is a dynamic link library (DLL).

In accordance with yet another aspect of illustrative embodiments of thepresent invention, the method further comprises providing, to the user,a serial number corresponding to the selected content; and using theserial number and the selected codec to verify the license for use ofthe selected content by the user.

Other aspects, advantages, and salient features of the invention willbecome apparent to those skilled in the art from the following detaileddescription, which, taken in conjunction with the annexed drawings,discloses illustrative embodiments of the invention.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects, features, and advantages of illustrativeembodiments of the present invention is more apparent from the followingdescription taken in conjunction with the accompanying drawings, inwhich:

FIG. 1 depicts an improved content delivery system in accordance with anillustrative embodiment of the present invention.

FIG. 2 illustrates a sequence of operations for the digital assistant inaccordance with an illustrative embodiment of the present invention.

FIG. 3 illustrates download token collaboration in accordance with anillustrative embodiment of the present invention.

FIG. 4 illustrates implementation of a codec within the context of adownload assistant in accordance with an illustrative embodiment of thepresent invention.

FIG. 5 depicts a payload structure in accordance with an illustrativeembodiment of the present invention.

FIG. 6 depicts a structure of a decrypted package in accordance with anillustrative embodiment of the present invention.

FIG. 7 illustrates a process for unpacking a payload package inaccordance with an illustrative embodiment of the present invention.

Throughout the drawings, the same drawing reference numerals areunderstood to refer to the same elements, features, and structures.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

The matters exemplified in the description such as a detailedconstruction and elements are provided to assist in a comprehensiveunderstanding of the embodiments of the invention. Accordingly, those ofordinary skill in the art will recognize that various changes andmodifications of the embodiments described herein can be made withoutdeparting from the scope and spirit of the invention. Also, descriptionsof well-known functions and constructions are omitted for clarity andconciseness. Furthermore, the terms used herein are defined according tothe functions of illustrative embodiments of the present invention.Thus, the terms may vary depending on a user's or an operator'sintention and usage.

A RED 10 is shown in FIG. 1 in accordance with illustrative embodimentsof the present invention. A user 12 seeks to download a secure package14 of content from a download server 16 (e.g., a public downloadserver). The enhanced retail electronic distribution platform(hereinafter “RED”) 10 builds manifests or lists of files needed tofulfill users' orders and assigns the orders with corresponding ordernumbers or purchase identifiers 18. Digital Assistants (DAs) 20 arepreferably pre-built with corresponding tokens that are stored in theRED. The DAs 20 can be stored at the RED 10 or can be stored anywhere(e.g., any public or private network). When a user 12 makes an order todownload content, the RED 10 provides a link to a DA 20 assigned forthat order, that is, the DA's token and the order's purchase identifierare linked. The DA 20 calls RED 10 to obtain the manifest correspondingto the purchase identifier, and the RED 10 verifies the DA 20 using thetoken. The RED 10 provides the DA 20 with a download URL response thatcan comprise URLs for a codec 22, the payload 14 requested by the user,among other items such as branding information.

With continued reference to FIG. 1, a decryption codec 22 is providedthat, like the DA 20, can be stored at the RED 10 or can be storedanywhere (e.g., any public or private network). The DA 20 assigned tothe order requests the codec 22 indicated in the download URL response.The codec 22 generates an installation code (IC) and provides it to theRED 10 server, and the RED 10 returns an activation code if verificationis successful. The codec 22 provides the verification result to the DA20. If verification is achieved, the DA 20 can commence processing thepayload 14 or secure package. The DA 20 streams packed and encryptedpayload data into buffers processed by the codec 22. The codec 22decrypts and unpacks the buffers as they are received. Thus, the DA 20and codec 22 perform iterative and multi-threaded processes to downloadthe requested secure package.

As described in more detail below and in accordance with illustrativeembodiments of the present invention, an improved content deliverysystem 8 is provided wherein the DA 20 exemplified in FIG. 1 ispreferably responsible for downloading all content and support files.The DA 20 can be an initial “seed” executable or it can be an installedapplication. In either case, it consumes the same services and utilizesthe same over-all architecture. The installation assistant describedabove in connection with the retail electronic distribution platform ofU.S. Pat. No. 7,882,037 is replaced by the codec 22 illustrated in FIG.1 (e.g., a dynamic-link library (DLL) file or other code that the DA 20runs to perform extended functionalities). Thus, the payload 14 orsecure package is no longer attached as a payload to an executableinstallation assistant and instead is just encrypted data.

These aspects of the improved content delivery system 8 exemplified inFIG. 1 eliminate several shortcomings of existing content deliverysystems. For example, a relatively large file will not require 30minutes or more for certain platforms to examine for security threats.The DA 20 exemplified in FIG. 1 is simplified and therefore overcomessignificantly increased processing delays of the download assistantexemplified in of U.S. Pat. No. 7,882,037, because there will be no needto extend the DA's functionality beyond the need to download a set offiles and load a DLL or codec 22. Management and versioning for thedigital assistant and installation assistant (IA) described in U.S. Pat.No. 7,882,037 or any similar configuration is essentially eliminatedbecause of the separation of the IA and payload in accordance withillustrative embodiments of the invention as illustrated in FIG. 1.Unlike the installation assistant in U.S. Pat. No. 7,882,037, the DLL orcodec 22 can be easily versioned. Because the payload 14 is merelyencrypted data that can be easily recovered using generic decryptionroutines, it is not be necessary to save a gold master on the server.Because it is not necessary to provide proprietary code such as aninstallation assistant on the desktop 12, it is easier and more securefor a future feature to prepare and upload the payload directly to thedownload server 16.

Download Assistant (DA) 20

FIG. 2 illustrates a sequence of operations 1 through 15 for the DA 20in accordance with an illustrative embodiment of the present invention.

1. The DA 20 makes the “Download URL Request”.

2. The URLs for branding collateral, the codec 22, and the payload 14are returned. The RED server 10 also returns the serial number.

3. The DA 20 requests the codec 22.

4. The codec 22 is saved to a Vista-compliant temporary folder, forexample, and loaded into the DA 20.

5. The DA 20 requests trial branding graphics when appropriate.

6. The trial graphic are received and saved to the system for later useby a verifier.

7. The DA 20 calls the codec 22 to verify the download license.

8. The codec 22 generates an installation code and sends it to theserver 10.

9. The RED server 10 does a check against download tolerance whereapplicable and returns an activation code.

10. The codec 22 returns the verification result to the DA 20. Ifverification is confirmed, then the DA 20 can start processing thepayload 14. Verification is preferably done first in order to obtain thekeys necessary for decrypting the download stream.

11. The DA 20 begins streaming the payload 14.

12. The packed and encrypted payload buffers are returned from thedownload server 16 via the DA 20.

13. As the payload 14 is received, the buffers are passed to the codec22 for processing.

14. The codec 22 decrypts and unpacks the buffers as they are received.

15. The codec 22 returns results as described in more detail below.Operations 11 through 15 are an iterative and multi-threaded process,for example.

The download stream can be processed as it is received. Separate threadsare preferably used for downloading and processing the stream.

Pre-building Download Assistants (DAs) 20

Building the download assistants (DAs) 20 is an important task done bythe RED server 10 whereby the server sets the resources and thendigitally signs each individual DA. The server 10 can pre-build the DAs20 during idle time or on a separate system so that, during peak times,the server is free for other tasks.

Different DAs 20 are preferably generated to accommodate different typesof platforms, as well as to handle different types of content and/orcontent delivery options and usage rights (e.g., streaming to a disc,rendering in a media player, installing to an iTunes library, rights touse based on various digital license requirements, and so on). Havingplatform-specific and material-specific DAs 20 provides flexibility andsimplicity to the content delivery system 8 in terms of being able toaddress the various processing needs and potential issues that can arisewhen different types of users' operating systems process different typesof delivered content 14. Thus, when a user 12 requests a payload 14, theRED server 10 can select and assign to that user 12 one of the DAs 20best suited for that user's system or platform for receiving the payloadand for the type of payload and authorized use. Further, by having theflexibility of the DA 20 loading a selected codec 22, the encryption anddecryption of the payload is greatly simplified to allow use of genericdecryption routines. In addition, different codecs 22 can be developedfor loading into assigned DAs 20 to add additional functionality,flexibility and simplicity to the system 8 by providing the necessarycodec processing steps to handle different types of content deliveryoptions.

The first part of this process is to configure each of the DAs 20 with a“download token” in the form of a GUID. The download token is recordedin a database, along with the location of that specific DA 20 on thefiles-system or even on an external download server. Then, when a DA 20is needed, the RED 10 server only needs to associate the necessaryinformation including a serial number associated with an order to aknown download token and deliver the pre-built DA file. Thus, a serialnumber does not have to be embedded in the DA 20 at the point of sale.Instead, this information can be fetched from the server at runtime. Inother words, when the user purchases a license (e.g., in the form of aserial number) the serial number is associated with the download token,allowing the DA 20 to fetch the serial number and activate the license.

The same download token is used in the Download URL Request (e.g.,operation 1 in FIG. 2) to obtain all of the URLs needed by the DA 20 aswell as the serial number used to activate the download license.

FIG. 3 illustrates download token collaboration using the followingoperations 1 through 8 in accordance with an illustrative embodiment ofthe present invention.

1. During preparation of the DA 20, the “download token” 24 is set inthe resources. At this point, the DA 20 may be placed on an externaldownload server because there is no further need to alter it.

2. The same “download token” (e.g., as used in operation 1 in FIG. 2) issaved in the database 26.

3. During a purchase, the token is reserved for the order; and

4. a serial number for the sale is recorded against the token.

5. The URL for the DA 20 with the token is given to the customer 12.

6. During validation of the download license, the token is recoveredfrom the resources of the DA 20; and

7. the token is sent to the server 10 in the Download URL Request (e.g.,operation 1 in FIG. 2).

8. The Download URL response (e.g., operation 2 in FIG. 2) contains theserial number for the order and this is used to verify, and activate thedownload license needed to decrypt the payload.

DA Configuration Component 32

The RED server 10 can comprise a DA configuration component 32 orinterface to prepare the DA 20 with branding information and licensinginformation in accordance with an illustrative embodiment of the presentinvention. This represents a significant advantage as licensinginformation has been separated from purchase-specific preparation tomake pre-configuration of a DA 20 possible.

The DA configuration component 32 properties can comprise, but are notlimited to, retailer contact information, the retailer's banner graphicand/or icon, and retailer support information in XML. The DAconfiguration component 32 can set the values specified in theproperties to the resources of a given target file, or set the values ofthe properties from those in the given target file. Further, with theability of multiple languages in the DA 20, the DA 20 provides formultiple support options based on region or language. For example, theretailer's support information can be XML-based and include unboundedlanguage characteristics.

Payload Creation Component 30

In accordance with an illustrative embodiment of the present invention,a payload creation component 30 (e.g., method and correspondinginterface) is provided to prepare a publisher's product for securedelivery via the system 8. The payload creation component 30 can be asoftware module in the RED 10 or stored externally. The payloadconstruction is advantageous because it does not include any processinginstructions beyond how to restore the file(s) and directory structureprepared for the product. This interface packs and encrypts a directorytree into a single file using a given key 28. If a variable (e.g.,MaxArchiveSize) is set and the directory tree exceeds the value, thepublisher's content package 14 is broken into multiple files (e.g., eachwith the same name but with a progressive extension such as FileABC.001,FileABC.002 . . . . File ABC.n). Once the packaging is finished, thereis provided an XML file in the directory with the same name as thepayload 14 that contains a list of the archives that were created.

Operations of this interface 30 can comprise specification of the rootdirectory to begin packing or unpacking, a fully qualified file name forthe package 14, the size of the package 14 once packed, and the maximumsize for the individual archived files.

The payload creations component 30 recursively packs the folders andfiles at the given root directory and produces an output file. A productitem key 28 can be used to encrypt the package. The payload creationscomponent 30 unpacks the file name for the package. The product item key28 can be used to decrypt the package.

When multiple archives are created, the server 10 needs to know thenames that were generated, as well as the order of the files in thearchive. To provide this information, the payload creation component 30preferably outputs a file after the archive is created with XML schema.

Codec 22

In accordance with illustrative embodiments of the present invention,the DLL 22 is used to process the data stream provided by the DA 20. TheDLL 22 is called a codec because it is similar to a typical video codecthat exposes consistent interfaces to process a video stream and can bedownloaded on demand to handle new stream types or to deploy newversions.

The codec 22 replaces the functionality of the Installation Assistantdescribed in U.S. Pat. No. 7,882,037 for license verification anddecryption of the payload. In accordance with illustrative embodimentsof the present invention, it is designed to allow in-place processing ofthe data-stream which results in a single footprint for the download(e.g., only one copy of the payload package is needed).

The codec 22 comprises two components: a security library and adirectory packer. The security library provides securityrelated-functions including license verification and decryption of thedownload stream. The directory packer unpacks the download into theoriginal directory structure and files.

FIG. 4 illustrates implementation of the codec 22 within the context ofthe DA 20 in accordance with an illustrative embodiment of the presentinvention. Separate threads 40 and 42 are preferably used, respectively,for the download by the DA 20 and the stream processing by the codec 22,which is an important factor in achieving optimal performance. Thisimplementation allows a relatively slow and non-CPU intensive downloadto proceed as the system is performing the more CPU intensive tasksnecessary to process the stream. FIG. 4 also illustrates the operationof the codec 22 to maintain an internal queue (e.g., operation 7 in FIG.4) to allow the codec to support not only in-line decryption of thestream, but also streamed block decryption that requires a specificblock alignment. In order to perform this implementation independentlyof the DA 20, the codec 22 queues the data provided through aProcessBuffer call so it can manage the block alignment.

The codec 22 is not threaded but it is thread safe. That is to say, allcalls will block until all processing is complete. It is preferably upto the caller to manage a thread for the codec.

The codec 22 supports both single files, as well as multiple filesthrough the use of a stream handle which is returned by a callInitializeStream. When InitializeStream is called, the codec 22 createsa new class to handle the stream. A pointer to this class is stored inan array (or indexed link-list), and is then returned to the caller asthe handle. The handle is used in subsequent calls so the codec 22 canlocate the appropriate stream handling class for the call.

As the multi-part archive is actually only one stream of data, the codecdoes not need to use multiple handles to process it. The multiple partsare assembled into one buffer and then passed to the codec 22 so itappears as one large data stream to the codec.

With continued reference to FIG. 4, a call from a downloader 44 in theDA 20 initializes (operation 1) the codec 22 and a stream processor(e.g., a data streamer 34 as shown in FIG. 1) described in more detailbelow. A codec thread 42 returns a handle to a codec instance to supportmultiple simultaneous downloads (operation 2 in FIG. 4). The handle isused in subsequent calls. Parameters can include, but are not limitedto: a digital license for the download in encrypted and encoded format,the exact length of the Download License parameter in bytes, a digitallicense identifier for the download license (e.g., in hexadecimal), theserial number received for the purchase (e.g., through the ResponseXML), the public key for the publisher (e.g., in hexadecimal), thelength in bytes of the public key parameter, and the directory where thestream is unpacked to. As stated above, the return in operation 2 inFIG. 4 is a handle to a codec stream processor wherein all subsequentcalls must use this handle.

The digital receipt is verified for proof of purchase (operation 3 inFIG. 4), and a result is returned (operation 4 in FIG. 4). FIG. 4illustrates that the verification was successful. To verify the downloadlicense (operation 3 in FIG. 4), the codec 22 performs a call thatverifies the license, allowing the DA 20 to check the validity of thelicense prior to the download. Parameters can include, but are notlimited to: the handle to the stream processor as returned fromInitializeStream. Returns (i.e., operation 4 in FIG. 4) can be astandard PSIKey Error Code, among others.

Processing Buffers

With reference to operations 5 and 6 of FIG. 4, the processing buffersfunction of the codec 22 processes data buffers as they are downloadedfrom the stream. All processing of the stream is done, for example,in-line to create a single storage footprint in accordance withillustrative embodiments of the present invention.

The downloader requests raw (encrypted data) from the server (operations5 and 11 in FIG. 4). This occurs in an iterative loop until the end ofthe stream is reached. The data is passed to the codec for processing(operation 6 in FIG. 4).

The codec queues the data until there is at least one complete packet ofblock-aligned encrypted data (operation 7 in FIG. 4). When a completedata-block has been received the block is recovered from the queue forfurther processing. The now aligned block of encrypted data is passed tothe security layer (operation 8 in FIG. 4), and decrypted and returnedfor further processing (operation 9 in FIG. 4). As indicated byoperation 10 in FIG. 4, the decrypted block from the previous step ispassed to the directory packer (which in this case is actually anunpacker).

The directory packer process the decrypted block of data (operation 12in FIG. 4). The stream may contain processing meta-data or binary data.Depending on the type of data received, data may be written to disk orprocessing instructions prepared or executed. The results of theprevious step are returned to the codec (operation 13 in FIG. 4), and afinal result returned to the downloader (operation 14 in FIG. 4). Thismay result in feedback to other systems or information displayed to theend user.

The parameters can be, but are not limited to, lHandle—the handle to thestream as opened; pucBuffer—the buffer as a raw stream of bytes;sBufferLength—the length of the buffer in bytes; lOffsetStart—the byteat which this buffer starts in the overall stream; lOffsetEnd—the byteat which this buffer ends in the overall stream; andlLastByteProcessed—passed by reference so codec knows where to restartif for any-reason the DA stops sending buffers (e.g., Pausing).

In accordance with an illustrative embodiment of the present invention,even if the buffer is accepted and queued for processing, there is noguarantee that all of the data was successfully processed. With eachcall, this function returns the STREAM OFFSET of the last successfullyprocessed byte in a LastByteProcessed parameter. If the codec DLL 22 isunloaded, the caller resumes the stream starting from this offset. Whenthe caller sends the last buffer of data, this call can, for example,return with the LastByteProcessed parameter value equal to lOffsetEnd.

Example returns can be, but are not limited to: BufferError—anenumerated type; NoError—the buffer was processed without errors;Resend—there was a problem with the stream that may be fixed byresending the stream starting from lLastByteProcssed (e.g., this cancover issues such as a bad file CRC by setting this value to thebeginning of the file in the steam); Halted—the codec was halted or isin a bad state and is restarted, but it may still be possible to resumethe stream); ResetStream—the stream was found to have a critical problemand cannot be resumed and the download is restarted from the first byte;AccessDenied—write access was denied to the target location;InvalidName—the target file or directory name is invalid for the OS;OutOfSpace—there was not enough space for the entire package on thetarget drive and Confirm Download Complete

Messages

The Download URL Request is described above in connection with operation1 in FIG. 2. The Download URL Request is formatted to support thepre-built DAs 20 described above in accordance with an illustrativeembodiment of the invention to realize the advantages described herein.The Download URL Request can also comprise additional processinginstructions to allow for a data-driven or data-specific system andtherefore a more flexible system for secure product delivery. Formulti-part archives, the ResponseURL described above in connection withoperation 2 in FIG. 2 can comprise <Product> and <Archive> elements toassociate multipart archives with individual products and allow formultiple product offerings.

The DA 20 is provided with a download token, which is an abstractidentifier that points to all collateral needed by the DA 20. A variablecan be used to hold an array of locations for multi-part archives. Forsingle archive products, only one string is used in the array.

The Download URL Response can include, but is not limited to,Location—the location of the (e.g., packed and encrypted) payload,including multiple locations as needed; SerialNumber—the serial numberspecific to the sale and used during verification of the downloadlicense; OfferID—the offer ID needed by the trial wrapper to redirect apurchase; BrandID—the brand ID needed by the trial wrapper to redirect apurchase; Resource—URLs for additional resources (e.g., the typespecifies which resource); and Error—an error code and message (e.g.,zero for no error).

Payload Structure

The payload 14 contains a copy of deliverables to the end user. The datais streamed in buffers and is processed by a data streamer 34 that canbe part of or separate from codec 22 in accordance with an illustrativeembodiment of the present invention.

The payload is advantageous over the system described in U.S. Pat. No.7,882,037 in that it is no longer embedded in an Installation Assistantin accordance with an illustrative embodiment of the present invention,thereby overcoming problems posed by authentication in certain operatingsystems and problems associated inflexible system versioning options.

For example, when using the default security settings of Windows Vista,the operating system (OS) always makes a copy of an executable file andscans it for potential security risks. This process can take upwards of20 minutes for a 1 Gigabyte (GB) file. By using a separate payload,there is no longer a huge Installation Assistant that Vista must copyand scan. Further, when the payload was embedded in the installationassistant as described in U.S. Pat. No. 7,882,037, any new feature orbug fix would force a rebuild and redeployment of all of thedownloadable packages. This is expensive in terms of CPU usage andnetwork bandwidth. It also carries with it the burden of managing thenew version on both the server and desktop. It also forces the server tokeep a copy of all gold masters which carries both the burden of storageand security.

In accordance with an illustrative embodiment of the present inventionand with reference to FIG. 5, the payload 34 structure is a simplepacked directory structure 46 that is encrypted using standardalgorithms. Versioning is now limited to changes to encryption (which israre), and modifications to the internal package structure 48, which, ifwell designed, will also rarely change. Even when they do change, it iseasier for the RED server 10 to recover the packages from the downloadserver 16 and rebuild them because all processing is external to thepackage. Because it is possible to recover the packages from thedownload server 16, it is also possible to eliminate the need to storethe gold masters in the database 26.

For example, the payload 14 is an encrypted package 54 containing apacked directory structure 46. The packed directory structure 46comprises header information describing the hierarchy of the packeddirectories and a second header section containing information about thefiles that includes all of the file attributes and their byte offsets inthe payload. The remainder of the payload structure 54 is the files(e.g., File 1, . . . , File X) appended in the order and at thepositions specified by the header.

In accordance with an illustrative embodiment of the present invention,a specific implementation of a payload structure will now be describedwith reference to FIG. 6, which depicts an illustrative file structureof a decrypted package 14, and FIG. 7, which illustrates a process forunpacking a payload package 54.

A data streamer 34 is provided that can be part of the codec 22, butalternatively can be separate from the codec 22. With reference to step60 in FIG. 7, the data streamer 34 is sent arbitrary buffers ofsequential data. Data is streamed to the codec 22 in buffers, forexample, by the DA 20 and the codec has the programmed intelligence toknow how to process the incoming data. In the illustrated embodiment,the DA 20 provides the data to the codec 22 for decoding; however, othersystems can utilize the codec 22 if they comply with the codecinterface. For example, a secure download API can utilize the same codec22. Information about the buffer is also necessary such as buffer sizein bytes, buffer offset start and buffer offset end (e.g., relative tothe raw decrypted package), for example. The DA requests blocks of datain a specific range. The codec knows how to process the data dependingon the range that was requested (e.g., the data may be the files todownload or processing meta-data).

The data streamer 34 is responsible for reading/recording any otherinformation required to extract data from a stream. All Headerinformation and XML data is stored on disc. All information regardingthe Payload 14 is in the XML file. The data streamer 34 extracts andparses XML for all data.

As part of the basic workflow, the codec 22 streams decrypted data todata streamer 34. The data streamer 34 then distinguishes three mainsections of the payload structure package 54 illustrated in FIG. 6, thatis, the header 50, XML 52, and payload 14.

The header 50 contains information on how to unpack the package. Forexample, the first eight bytes show the version of codec used. The nextfour bytes points to the end of the header. The next four bytes pointsto the end of the XML file 52. For this version of the codec 22, this isall the necessary information needed from the header 50.

The header 50 contains data types that cannot be read by single bytes.In case a buffer does not contain the entire head, the buffer is storedin memory and the data streamer 34 waits until the entire header 50 canbe read and written to disc, as illustrated in steps 62, 64, 66, 68, 70,72, 76 and 78. If the header is incomplete, a buffer acknowledgedmessage is returned, but without any indication that return buffer wassuccessfully processed yet. If the DA 20 shuts down before headerinformation 50 has been stored, the DA 20 will automatically restartdownload from the beginning. For buffers larger than the header size,the rest of a buffer is passed to the XML parser in the codec 22.

The XML document or file 52 contains information on how to reproduce thefolder structure of the payload 14, and how to extract data from thestreamed payload. Once the header 50 has been extracted, the datastreamer 34 knows where the XML data 52 begins and ends in the stream asindicated in steps 80 and 82. The XML 52 is written to a string and isstored to disc on the user desktop 12 to support resuming a download asindicated in steps 84, 86 and 88. Each buffer is checked for the end ofXML 52, and all XML data is appended to string and appended to discimmediately. Once entire XML has been extracted, the string is passed toa parser located in the codec 22 (step 90) to process the information.

If the DA 20 crashes, the stream will resume from last successful buffersent. If the crash occurs after writing XML 52 to disc, the incomingstream starting from the last successful buffer will contain dataalready stored on disc. To avoid this, the data streamer 34 will need tocheck offset of incoming buffer and append to appropriate location ofXML 52. Alternatively, the data streamer 34 can overwrite starting atthe given offset. XML 52 string needs to be loaded from disc. The datastreamer 34 can acknowledge buffers and not return finished until theentire XML has been extracted and sent to disc.

Once the XML data 52 has been processed from the stream, it is ready tobe parsed. The XML parser in the codec 22 is responsible for creatingthe file structure and writing the file information to a StandardTemplate Library (STL) map (steps 98 and 98). The parser alsopre-allocates all files to guarantee enough disc space is reserved towrite files (step 100). A files element attribute stores the entirepayload size. This value can be compared with disc to check for adequatedisc space.

If there is not enough disc space (step 92), the data streamer cancelsthe download which forces the Digital Assistant to restart download onnext resume (step 94). The DA 20 also needs to send a message promptingthe user that the required disc space is not sufficient and downloadmust be paused or cancelled. The parser can remove all pre-allocatedfiles if error occurs. If space cannot be allocated, there is no reasonto store these files to disc since they contain no data.

Each time a download is resumed, the parser can be called to check thatthe folder structure has not been modified. If the DA 20 was shut down,the STL map has been lost. If the DA 20 resumes the download, the parseris called again to map file information. If folder structure has beenmodified, an error can be returned to force a restart. The data streamer34 can also attempt to create missing sub-directories and files but, ifpayload has been modified, there is no guarantee payload is still valid.

Any remaining buffer information left from extracting XML data from abuffer is sent to process as a part of the payload 14.

As stated above, the payload 14 contains a copy of deliverables to theend user 12. The data is streamed in buffers and is processed by thedata streamer 34.

A history of downloaded files and buffers is stored on the DA 20. Thecodec 22 relies on the DA 20 to know where to a download left off Aftereach buffer has been successfully written to disc, a return message issent to the DA 20 stating the buffer has completed. It is up to the DA20 to store this information in the event that it is shut down and adownload must resume.

Writing the payload to disc or the user desktop 12 requires the folderstructure to have already been created and the file information writtento a STL map. Each incoming buffer is compared with the STL map to knowwhat file(s) and which byte to begin writing the buffer contents todisc.

If a crash occurs, the data streamer 34 does not store any informationregarding the buffer that crashed. The DA 20 sends a buffer with offsetstart and offset end. With the file map and buffer information, the datastreamer 34 can determine what file to write to (steps 102, 104, 106,108, 110, 112 and 114). The data streamer 34 can record the last filesuccessfully written to disc by storing the key from the STL map. Thekey can provide a faster means to finding which file to begin writing tofrom a buffer. Buffer offsets continue to be used to verify the actualfile to write.

If the DA 20 closes or crashes, the XML 52 needs to be parsed again. Thedirectory structure can be checked in the event that the user modifiedthe payload directory tree.

CRC checksum can be performed for each file. After each file has beencompleted (step 106), CRC checksum is performed.

When resuming a download, the data streamer 34 will assume the payload14 has not been modified by user. If data streamer 34 attempts to writeto a file that does not exist, the payload 14 has been modified and isconsidered corrupt. The DA 20 will report an error message and force arestart. A user 12 should not be modifying the payload 14. The datastreamer 34 can perform a check against the payload 14 to detectcorruption.

The interfaces between the DA 20, the codec 22 and the data streamer 34will now be described in accordance with an illustrative embodiment ofthe present invention.

The codec 22 has minimal responsibility over the data streamer 34. Forexample, the codec 34 need only uses the calls initialize, processbuffer, and destructor. The data streamer 34 will return bufferacknowledged, buffer complete, and buffer error. The data streamer 34is, for example, a class to be called by the codec 22.

For example:

DataStreamer DataStreamer( );  Constructor: called when codec 22 isinitialized. Data streamer 34 needs  to wait for DA 20 to initialize theobject to know the download state. bool init( string sRootDir, longLastSuccessfulByte );  Before the DA 20 can send buffers to the codec22, the data streamer 34  needs to know the current state of unpacking.This is necessary for  resuming download when in a paused state or whenthe DA 20 and  codec  22 are shut down. Information from the DA 20 needsto be  compared with  data stored on disc 12.  Inputs: LastSuccessfulByte is returned each time a Buffer has been processed. DA 20 needs to initialize this value to 0 and pass to codec 22  beforeinit( )  can be called.  DataSteamer needs to know the root Directory ofthe payload. BufferErrorMsg ProcessBuffer( Byte * buffer, longBufferSize, long    BufferOffsetStart, long BufferOffsetEnd, long *   LastSuccessfulByteOffset);  enum BufferErrorMsg {   Processed,  Not_enough_disc_space,   Invalid_Header_Data,   Invalid_XML,  XML_not_found,   Directory_not_found,   File_not_found,  File_failed_to_open,  };  Once the data streamer 34 has beeninitialized, it is ready to process  incoming buffers.  Long *LastSuccessfulByteOffset is a pointer to a long that  stores the last byte that was successfully written to disc from ProcessBuffer.  Thevalueof the long is to be sent to DA 20 and to be updated  when DA 20calls  init( ).  If a buffer is acknowledged but has not written thedata to disc, then  LastSuccessfulByteOffset will return the same valueas before.  Errors:  0. Processed  1. Not enough disc space  2. InvalidHeader Data  3. Invalid XML  4. XML not found  5. Directory not found 6. File not found  7. File failed to open  8. CRC failed

The data stored to disc can be, but is not limited to, a header 50(e.g., Header version, header size, XML size), XML 52 (e.g., XML string)and payload 14 (e.g., file map key, file name, and file directory).

To create a download package 14, a user can upload a single executableor a zip file, for example, to the server. To download the package bythe DA 20, a class PackageDeliverables can be used. For example:

bool PackageDirectoryTree(string sDirectory, string sPackageName);

In accordance with illustrative embodiments of the present invention,the entire directory tree is scanned. All files and folders in thedirectory are packaged. A file with the name sPackageName is written todisc in the directory one level up from the sDirectory. For example:

-   -   sPackageName=“temp.dat”    -   sDirectory=“C:\Windows\temp\product a”    -   Output file: “C:\Windows\temp\temp.dat”

When resuming a download, files already written to disc can be checkedagainst their checksum for integrity. If a file that has already beenstreamed is corrupt, the entire payload is corrupt and is restarted. Allfiles have been pre-allocated. If any file is removed and DA 20 attemptsto write data to the missing file, the payload 14 is corrupt and mustrestart download. The user should not be modifying the payload 14 whiledownloading. The maximum size on an individual file can be 4 GB, forexample, because buffer offsets and size are stored in a LONG. There is,however, no limit on the size of an entire package due to themulti-archive operation in accordance with illustrative embodiments ofthe present invention. The limit on an individual file in the archiveset is still 4 GB but there can be thousands of files in the set.

The total size of package consists, for example, of the header, XML andpayload. The Header can be 16 bytes, for example. The XML size dependson the folder and file structure.

The data streamer 34 can store the last processed buffer offset on discto be compared with DA 20. Each time the data streamer 34 completes abuffer and sends the last offset to the DA 20, the offset can be storedon disc. When resuming download, the offset values can be compared withDA 20 to make sure the DA 20 and codec 22 are still in sync.

Illustrative embodiments of the present invention have been describedwith reference to a RED server 10, a DA 20, a codec 22, a data steamer34, among other components. It is to be understood, however, that thepresent invention can also be embodied as computer-readable codes on acomputer-readable recording medium. The computer-readable recordingmedium is any data storage device that can store data which canthereafter be read by a computer system. Examples of thecomputer-readable recording medium include, but are not limited to,read-only memory (ROM), random-access memory (RAM), CD-ROMs, magnetictapes, floppy disks, and optical data storage devices. Thecomputer-readable recording medium can also be distributed overnetwork-coupled computer systems so that the computer-readable code isstored in different memory devices and executed in a distributedfashion. Also, functional programs, codes, and code segments foraccomplishing the present invention can be easily construed as withinthe scope of the invention by programmers skilled in the art to whichthe present invention pertains.

While the invention has been shown and described with reference to acertain embodiment thereof, it is understood by those skilled in the artthat various changes in form and details may be made therein withoutdeparting from the spirit and scope of the invention. Consequently, thescope of the invention should not be limited to the embodiment, butshould be defined by the appended claims and equivalents thereof.

What is claimed is:
 1. A method comprising: receiving a request from auser device for executing selected content; identifying a downloadassistant service to facilitate the fulfillment of the request;selecting a codec from among a plurality of codecs depending on a methodof executing content employed at the user device and a designatedcontent type of the selected content, wherein the plurality of codecscomprise at least two different codecs to handle at least one ofdifferent types of content and different methods of executing content atthe user device; calling the selected codec to verify a licenseassociated with the selected content; generating, by the selected codec,an installation code; sending, by the selected codec and to the downloadassistant, an activation code based on the installation code, theactivation code indicating verification of the license associated withthe selected content; and providing to the user device the selecteddownload assistant service and the selected codec for enabling executionof the selected content at the user device, wherein the executingcomprises performing multiple simultaneous or near simultaneousdownloads of the selected content via the selected download assistantservice, placing the selected content into buffers via the selecteddownload assistant service, and decrypting and unpacking the buffers viathe selected codec.
 2. The method of claim 1, wherein identifying thedownload assistant service depends on at least one of a platformemployed by the user device, an operating system employed by the userdevice, the method of executing content employed by the user device, andthe designated content type of the selected content.
 3. The method ofclaim 1, wherein the download assistant service comprise at least twodifferent download assistant service for managing at least one ofdifferent platforms, different user devices, different operatingsystems, different methods of rendering content for the user, anddifferent types of content.
 4. The method of claim 1, wherein theselected content is rendered by iteratively placing the selected contentinto buffers.
 5. The method of claim 1, wherein the rendering comprisesemploying separate threads for the selected download assistant service,and for the selected codec, respectively, to stream the selected contentinto buffers, and to decrypt and unpack the buffers.
 6. The method ofclaim 1, wherein the payload for the selected content is prepared forstorage by packing and encrypting a directory structure containing atleast one of a file and digital media into an archive.
 7. The method ofclaim 6, further comprising dividing the payload into multiple archiveswith a descriptor that lists the archives when the at least one of afile and digital media exceed a selected size limit.
 8. The method ofclaim 7, wherein the executing further comprises employing thedescriptor to facilitate unpacking the buffers.
 9. The method of claim1, further comprising associating a token corresponding to the selecteddownload assistant service with an order number associated with therequest, and providing the download assistant service with a link to theselected codec and a link to the selected content upon verification ofthe download assistant service using the token.
 10. The method of claim1, wherein a secure API is used for the selected download assistantservice.
 11. A method comprising: identifying a download assistant fromamong a plurality of download assistants to fulfill an order forselected content, and selecting a codec from among a plurality ofcodecs; providing, to a user device, the identified download assistant,the selected codec, multiple simultaneous or near simultaneous downloadsof the selected content, and a serial number to identify the order,wherein the serial number is associated with a corresponding token ofthe selected download assistant; verifying, by the selected codec, alicense for the selected content using the serial number; and uponverification of the license, decrypting the selected content using theselected codec; wherein the selected codec is selected based on type ofdelivery of the selected content at the user device.
 12. The method ofclaim 11, wherein each of the plurality of download assistants areprovided with a corresponding token.
 13. The method of claim 11, whereindecrypting further comprises streaming the selected content anditeratively placing the selected content into buffers via the selecteddownload assistant and decrypting and unpacking the buffers via theselected codec while streaming to provide the selected content to theuser device.
 14. The method of claim 13, wherein the streaming comprisesemploying separate threads for the selected download assistant and theselected codec, respectively, to stream the selected content into thebuffers, and to decrypt and unpack the buffers.
 15. The method of claim13, wherein the selected content is prepared by packing and encrypting adirectory structure containing at least one of a file and digital mediainto an archive, and dividing the selected content into multiplearchives with a descriptor that lists the archives when the at least oneof a file and digital media exceed a selected size limit.
 16. The methodof claim 15, wherein the streaming further comprises employing thedescriptor to facilitate unpacking the buffers.
 17. The method of claim13 wherein the plurality of download assistants comprises at least twodifferent download assistants for managing at least one of differentplatforms, different user devices, different operating systems,different methods of rendering content for the user, and different typesof content.
 18. The method of claim 13 wherein the plurality of codecscomprises at least two different codecs to handle at least one ofdifferent types of content, and different methods of rendering contentfor the user.
 19. The method of claim 11, wherein the selected downloadassistant is selected based on at least one of a type of system employedby the user device to receive the selected content and a type of theselected content.
 20. The method of claim 11, wherein selecting thedownload assistant depends on at least one of a platform employed by theuser device, an operating system employed by the user device, the methodof rendering content employed by the user device, and the designatedcontent type of the selected content.
 21. The method of claim 1, whereinplacing the selected content into buffers via the selected downloadassistant service comprises placing the selected content into buffersvia the selected download assistant service, wherein the placed selectedcontent comprises at least one complete packet of block-alignedencrypted data.
 22. The method of claim 11, further comprising placingthe selected content into buffers via the identified download assistantservice, wherein the placed selected content comprises at least onecomplete packet of block-aligned encrypted data.
 23. A methodcomprising: identifying a download assistant from among a plurality ofdownload assistants to fulfill an order for selected content, andselecting a codec from among a plurality of codecs; providing, to a userdevice, the identified download assistant, the selected codec, multiplesimultaneous or near simultaneous downloads of the selected content, anda serial number to identify the order, wherein the serial number isassociated with a corresponding token of the selected downloadassistant; verifying a license for the selected content using the serialnumber and the selected codec; and upon verification of the license,decrypting the selected content using the selected codec; wherein theselected codec is selected based on type of delivery of the selectedcontent at the user device; and wherein verifying the license comprises:calling the selected codec to verify the license; generating, by theselected codec, an installation code; and sending, by the selected codecand to the download assistant, an activation code based on theinstallation code, the activation code indicating verification of thelicense associated with the selected content.